$INCLUDE: 'C:\FG\FASTGRAF.FI'

      PROGRAM MAIN

      INTEGER MODE, STATUS
      INTEGER WIDTH, HEIGHT
      INTEGER*1 HEADER(128)
      INTEGER FG_FLICHEAD, FG_FLICMODE

      CALL FG_INITPM
      STATUS = FG_FLICHEAD('GLASS.FLI'//CHAR(0),HEADER)
      IF (STATUS .EQ. -1) THEN
         STOP 'Can''t open GLASS.FLI.'
      ELSE IF (STATUS .EQ. -2) THEN
         STOP 'GLASS.FLI is not a FLI or FLC file.'
      END IF

      MODE = FG_FLICMODE(HEADER)
      WRITE(6,10) MODE
10    FORMAT (' Optimal display mode is',I3,'.')

      CALL FG_FLICSIZE(HEADER,WIDTH,HEIGHT)
      WRITE(6,20) WIDTH, HEIGHT
20    FORMAT(' Image size is ',I3,' by ',I3,' pixels.')

      STOP ' '
      END
